import Vue from 'vue'
import App from './App'
import {$http} from '@escook/request-miniprogram'
Vue.config.productionTip = false
//定义错误显示方法
uni.$showMsg = function(title="加载失败",duration=1500){
  uni.showToast({
    title,
    duration
  })
}
uni.$http = $http
//请求的基准地址
$http.baseUrl = 'https://www.uinav.com/api/public/v1'
$http.beforeRequest = function (options) {
  uni.showLoading({
    title: '数据加载中...',
  })
}
$http.afterRequest = function () {
  uni.hideLoading()
}

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
